package org.cloud.core.common.result;

import lombok.Getter;

/**
 * @author Violet
 * @description 统一返回结果枚举
 * @date 2021/5/20
 */
@Getter
public enum ResultEnum {

    SUCCESS(200, "操作成功"),

    FAIL(400, "操作失败"),
    UNAUTHORIZED(401, "身份未验证"),
    FORBIDDEN(403, "权限不足"),

    UNKNOWN(999, "未知错误");

    private final Integer code;
    private final String msg;

    ResultEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
